/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.iss.examsys.entity;

/**
 *
 * @author User
 */
public class StudentExamStatus {
    
    private String userId;
    private int answeredQuestions;
    private long examId;

    public StudentExamStatus(String userId, long examId,int answeredQuestions, String studentStatus) {
        this.userId = userId;
        this.answeredQuestions = answeredQuestions;
        this.studentStatus = studentStatus;
        this.examId = examId;
    }
    
    /** Student status In Progress, Logged Out and Submitted*/
    private String studentStatus;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public int getAnsweredQuestions() {
        return answeredQuestions;
    }

    public void setAnsweredQuestions(int answeredQuestions) {
        this.answeredQuestions = answeredQuestions;
    }

    public String getStudentStatus() {
        return studentStatus;
    }

    public void setStudentStatus(String studentStatus) {
        this.studentStatus = studentStatus;
    }

    public long getExamId() {
        return examId;
    }

    public void setExamId(long examId) {
        this.examId = examId;
    }
    
    @Override
    public boolean equals(Object obj) {
        if(obj!=null){
            if(obj instanceof StudentExamStatus){
                StudentExamStatus others = (StudentExamStatus) obj;
       
                if(this.userId.equals(others.getUserId())){
                    return true;
                }
            
            }else{
                return false;
            }
          
        }
        
         return false;
    }
    
    
    
}
